package cn.cau.epidemicsurveysystem.bean;

import javax.persistence.*;

@Entity
@Table(name = "diseaseDistribution", schema = "gp2022", catalog = "")
public class DiseaseDistributionBean {
    private int diseaseDistributionAreaId;
    private Integer diseaseId;
    private String area;
    private Integer currentNum;
    private Integer totalNum;
    private Integer deadNum;
    private Integer curedNum;
    private Integer increasedNum;
    private Integer suspectedNum;
    private Integer severeNum;
    private Integer overseasInput;

    @Id
    @Column(name = "diseaseDistributionAreaId")
    public int getDiseaseDistributionAreaId() {
        return diseaseDistributionAreaId;
    }

    public void setDiseaseDistributionAreaId(int diseaseDistributionAreaId) {
        this.diseaseDistributionAreaId = diseaseDistributionAreaId;
    }

    @Basic
    @Column(name = "diseaseId")
    public Integer getDiseaseId() {
        return diseaseId;
    }

    public void setDiseaseId(Integer diseaseId) {
        this.diseaseId = diseaseId;
    }

    @Basic
    @Column(name = "Area")
    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
    }

    @Basic
    @Column(name = "currentNum")
    public Integer getCurrentNum() {
        return currentNum;
    }

    public void setCurrentNum(Integer currentNum) {
        this.currentNum = currentNum;
    }

    @Basic
    @Column(name = "totalNum")
    public Integer getTotalNum() {
        return totalNum;
    }

    public void setTotalNum(Integer totalNum) {
        this.totalNum = totalNum;
    }

    @Basic
    @Column(name = "deadNum")
    public Integer getDeadNum() {
        return deadNum;
    }

    public void setDeadNum(Integer deadNum) {
        this.deadNum = deadNum;
    }

    @Basic
    @Column(name = "curedNum")
    public Integer getCuredNum() {
        return curedNum;
    }

    public void setCuredNum(Integer curedNum) {
        this.curedNum = curedNum;
    }

    @Basic
    @Column(name = "increasedNum")
    public Integer getIncreasedNum() {
        return increasedNum;
    }

    public void setIncreasedNum(Integer increasedNum) {
        this.increasedNum = increasedNum;
    }

    @Basic
    @Column(name = "suspectedNum")
    public Integer getSuspectedNum() {
        return suspectedNum;
    }

    public void setSuspectedNum(Integer suspectedNum) {
        this.suspectedNum = suspectedNum;
    }

    @Basic
    @Column(name = "severeNum")
    public Integer getSevereNum() {
        return severeNum;
    }

    public void setSevereNum(Integer severeNum) {
        this.severeNum = severeNum;
    }

    @Basic
    @Column(name = "overseasInput")
    public Integer getOverseasInput() {
        return overseasInput;
    }

    public void setOverseasInput(Integer overseasInput) {
        this.overseasInput = overseasInput;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        DiseaseDistributionBean that = (DiseaseDistributionBean) o;

        if (diseaseDistributionAreaId != that.diseaseDistributionAreaId) return false;
        if (diseaseId != null ? !diseaseId.equals(that.diseaseId) : that.diseaseId != null) return false;
        if (area != null ? !area.equals(that.area) : that.area != null) return false;
        if (currentNum != null ? !currentNum.equals(that.currentNum) : that.currentNum != null) return false;
        if (totalNum != null ? !totalNum.equals(that.totalNum) : that.totalNum != null) return false;
        if (deadNum != null ? !deadNum.equals(that.deadNum) : that.deadNum != null) return false;
        if (curedNum != null ? !curedNum.equals(that.curedNum) : that.curedNum != null) return false;
        if (increasedNum != null ? !increasedNum.equals(that.increasedNum) : that.increasedNum != null) return false;
        if (suspectedNum != null ? !suspectedNum.equals(that.suspectedNum) : that.suspectedNum != null) return false;
        if (severeNum != null ? !severeNum.equals(that.severeNum) : that.severeNum != null) return false;
        if (overseasInput != null ? !overseasInput.equals(that.overseasInput) : that.overseasInput != null)
            return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = diseaseDistributionAreaId;
        result = 31 * result + (diseaseId != null ? diseaseId.hashCode() : 0);
        result = 31 * result + (area != null ? area.hashCode() : 0);
        result = 31 * result + (currentNum != null ? currentNum.hashCode() : 0);
        result = 31 * result + (totalNum != null ? totalNum.hashCode() : 0);
        result = 31 * result + (deadNum != null ? deadNum.hashCode() : 0);
        result = 31 * result + (curedNum != null ? curedNum.hashCode() : 0);
        result = 31 * result + (increasedNum != null ? increasedNum.hashCode() : 0);
        result = 31 * result + (suspectedNum != null ? suspectedNum.hashCode() : 0);
        result = 31 * result + (severeNum != null ? severeNum.hashCode() : 0);
        result = 31 * result + (overseasInput != null ? overseasInput.hashCode() : 0);
        return result;
    }
}
